package cn.kxm.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.kxm.dao.AdministratorMapper;
import cn.kxm.pojo.Role;
import cn.kxm.pojo.Sysuser;
import cn.kxm.service.AdministratorService;
@Service("AdministratorServiceImpl")
public class AdministratorServiceImpl implements AdministratorService{
    @Autowired
    private AdministratorMapper am;
	@Override
	public List<Map<String, Object>> findAdministratorList(String userName,
			Integer pageNo, Integer pageSize) {
		return am.findAdministratorList(userName, pageNo, pageSize);
	}
	@Override
	public int getAdministratorCount(String userName) {
		return am.getAdministratorCount(userName);
	}
	@Override
	public List<Role> getRoles() {
		return am.getRoles();
	}
	@Override
	public Sysuser checkUserName(String userName) {
		return am.findAdministratorByUserName(userName);
	}
	@Override
	public int addAdministrator(Sysuser sysuser) {
		return am.addAdministrator(sysuser);
	}
	@Override
	public Map<String,Object> getAdministratorById(Integer id) {
		return am.getAdministratorById(id);
	}
	@Override
	public int updateAdministrator(Sysuser sysuser) {
		return am.updateAdministrator(sysuser);
	}
	@Override
	public int delAdministrator(Integer id) {
		return am.delAdministrator(id);
	}
	
   
}
